import QtQuick 1.0
import com.meego 1.0
import "CommomUtil.js" as Util

Page {
    id: favorites_page

    tools: mainToolBar_layout

    orientationLock : PageOrientation.LockPortrait

    property int favorite_type: 1

    TitleBar{
        id: favorite_title
        anchors.top: favorites_page.top; anchors.left: favorites_page.left
        width: favorites_page.width; height: 71
        titleName: "收藏"
    }

    BorderImage {
        id: favorite_body_back
        source: "../images/favorite/back.png"
        width: favorites_page.width; height: favorites_page.height - favorite_title.height
        anchors.top: favorite_title.bottom; anchors.left: favorite_title.left
    }

    Rectangle{
        id: type_switch_rect
        width: favorites_page.width; height: 94
        opacity: 0
        anchors.left: favorite_title.left; anchors.top: favorite_body_back.top
    }

    Image{
        id: type_left
        width: 104; height: 51
        source: favorites_page.favorite_type === 1 ? "../images/favorite/btn_l_down.png" : "../images/favorite/btn_l_up.png"
        anchors.left: type_switch_rect.left; anchors.leftMargin: 136
        anchors.top: type_switch_rect.top; anchors.topMargin: 21
    }

    Image{
        id: type_right
        width: 104; height: 51
        source: favorites_page.favorite_type === 2 ? "../images/favorite/btn_r_down.png" : "../images/favorite/btn_r_up.png"
        anchors.right: type_switch_rect.right; anchors.rightMargin: 136
        anchors.top: type_switch_rect.top; anchors.topMargin: 21
    }

    Column{
        id: favorite_content
        anchors.top: type_switch_rect.bottom; anchors.left: favorites_page.left
        width: favorites_page.width; height: favorite_body_back.height - type_switch_rect.height
        Item{
            BorderImage {
                source: "../images/favorite/back2.png"
                width: parent.width; height: 68
                anchors.left: parent.left; anchors.top: parent.top
            }
            Text {
                color: "#7a7575"
                text: "汽车XX"
                font.pointSize: 16
                anchors.centerIn: parent
            }
        }
    }




//    Rectangle {
//        id: segment_btn_rect
//        width:favorites_page.width;height: 50
//        anchors.top:favorites_title_bar.bottom;anchors.left: favorites_title_bar.left
//        color:"yellow"
//        Button{
//            id: cartype_btn
//            Image {
//                id: cartype_bg
//                source: "../images/favorite/btn_l_down.png"
//            }
//            anchors.horizontalCenter: parent.horizontalCenter
//            anchors.verticalCenter: parent.verticalCenter
//            anchors.fill: parent
//        }

//        Button{
//            id: forum_btn
//            Image {
//                id: forum_bg
//                source: "../images/favorite/btn_r_up.png"
//            }
//            anchors.left: cartype_btn.right
//            anchors.horizontalCenter: parent.horizontalCenter
//            anchors.verticalCenter: parent.verticalCenter
//            anchors.fill: parent
//        }
//    }

//    Grid {
//        id: fav_list_grid
//        anchors.top: segment_btn_rect.top; anchors.left : segment_btn_rect.left
//        columns: 9
//        Item {
//            width: container.width ; height: 37
//            Text {
//                color: "#7a7575"
//                text: "汽车XX"
//                font.pointSize: 16
//            }
//            Rectangle{
//                opacity: 0;
//                anchors.fill: parent
//                MouseArea{
//                    anchors.fill: parent
//                    onClicked: Util.backToPage();
//                }
//            }
//        }
//    }

}
